<template>
    <div>
        <el-menu :default-active="$route.path"
      class="el-menu-vertical-demo"
      @open="handleOpen"
      @close="handleClose"
      background-color="#545c64"
      text-color="#fff"

      active-text-color="#ffd04b" router :collapse="$store.state.isCollapse" :collapse-transition="false">
      <el-menu-item index="/home/hi">
        <i class="el-icon-food"></i>
        <span slot="title">HelloWorld</span>
      </el-menu-item>
      <el-menu-item index="/home/index">
        <i class="el-icon-food"></i>
        <span slot="title">工作台</span>
      </el-menu-item>
      <el-menu-item index="/home/list">
        <i class="el-icon-heavy-rain"></i>
        <span slot="title">线索管理</span>
      </el-menu-item>
      <el-menu-item index="/home/protect">
        <i class="el-icon-heavy-rain"></i>
        <span slot="title">路由守卫</span>
      </el-menu-item>
     
    </el-menu>
    </div>
</template>

<script>

    export default {
        
        methods: {
      handleOpen(key, keyPath) {
        console.log(key, keyPath);
      },
      handleClose(key, keyPath) {
        console.log(key, keyPath);
      }
    } ,
    created(){
        console.log(this.$route)
    }
}
</script>

<style lang="scss" scoped>

</style>